import request from '@/utils/request'
// 查询企业的部门列表
export const reqGetDepartments = () => request({
  method: 'get',
  url: '/company/department'
})
// 删除组织架构
export const reqDelDepartments = (id) => request({
  method: 'delete',
  url: `/company/department/${id}`
})
// 新增部门 ,别忘了data  五个字段少pid
export const reqAddDepartments = (data) => request({
  method: 'post',
  url: '/company/department',
  data
})
// 获取部门详情
export const reqGetDepartDetail = id => request({
  method: 'get',
  url: `/company/department/${id}`
})
/**
 * 根据ID修改部门详情
 * @param {*} data
 * @returns
 */
export const reqUpdateDepartments = data => request({
  url: `/company/department/${data.id}`,
  method: 'put',
  data
})
